package com.mxpio.erp.common.quality.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mxpioframework.jpa.annotation.DictAble;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.jpa.policy.impl.CreatedDatePolicy;
import com.mxpioframework.jpa.policy.impl.UUIDPolicy;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "V_MB_ERP_INSPECTION_BILL_ASSEMBLY_PROBLEM")
@Schema(description="装配问题数量top10")
public class VEInspectionBillAssemblyProblem implements DictAble, Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @Schema(description = "申请时间（年）")
    @Column(name = "YEAR_")
    private String year;

    @Schema(description = "申请时间（年月）")
    @Column(name = "YEAR_MONTH_")
    private String yearMonth;

    @Column(name = "NUM_QUESTIONS_")
    @Schema(description = "问题数量")
    private BigDecimal numQuestions;

    @Column(name = "ITEM_CODE_")
    @Schema(description = "物料编码")
    private String itemCode;

    @Column(name = "ITEM_NAME_")
    @Schema(description = "物料名称")
    private String itemName ;

    @Column(name = "DRAWING_NO_")
    @Schema(description = "图号")
    private String drawingNo;


    @Transient
    private Map<String, String> textMap;
    public String putText(String key, String value) {
        if (textMap == null) {
            textMap = new HashMap<>();
        }
        return textMap.put(key, value);
    }
}
